﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class parttime : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {

        string strmax = get.getmaxwebjianzhiid();
        if (strmax == "")
        
        {
            strmax = "web10000";
        }
        int max = Convert.ToInt32(strmax.Substring(3)) + 1;
        strmax = strmax.Substring(0, 3) + max;
        string sex = "";
        if (RadioButton1.Checked)
            sex = "男";
        if (RadioButton2.Checked)
            sex = "女";
        get.insertwebjianzhi(strmax, txtname.Text, txtworktime.Text, txttel.Text, txtemail.Text, txtschool.Text, sex, txtpho.Text, DateTime.Now.ToShortDateString(), txtworkjingyan.Text);
        Label1.Text = "<script>alert('申请成功!');window.location.href='Default.aspx';</script>";
    }
    protected void Button1_Click1(object sender, EventArgs e)
    {
        string path = this.FU.FileName;
        string[] file = path.Split('\\');
        string filename = file[file.Length - 1];
        string path1 = Server.MapPath("");
        string ok = path1 + "\\images\\jianzhiper\\" + filename;
        FU.SaveAs(ok);
        this.Image1.ImageUrl = "~/images/jianzhiper/" + filename;
        txtpho.Text = filename;
    }
}
